3.2.66 \(\int \frac {(a+b \log (c x^n))^2 (d+e \log (f x^r))}{x} \, dx\) [166]

Optimal. Leaf size=57 \[ -\frac {e r \left (a+b \log \left (c x^n\right )\right )^4}{12 b^2 n^2}+\frac {\left (a+b \log \left (c x^n\right )\right )^3 \left (d+e \log \left (f x^r\right )\right )}{3 b n} \]

[Out]

-1/12*e*r*(a+b*ln(c*x^n))^4/b^2/n^2+1/3*(a+b*ln(c*x^n))^3*(d+e*ln(f*x^r))/b/n

________________________________________________________________________________________

Rubi [A]
time = 0.07, antiderivative size = 57, normalized size of antiderivative = 1.00, number of steps used = 4, number of rules used = 4, integrand size = 26, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.154, Rules used = {2339, 30, 2413, 12} \begin {gather*} \frac {\left (a+b \log \left (c x^n\right )\right )^3 \left (d+e \log \left (f x^r\right )\right )}{3 b n}-\frac {e r \left (a+b \log \left (c x^n\right )\right )^4}{12 b^2 n^2} \end {gather*}

Antiderivative was successfully verified.

[In]

Int[((a + b*Log[c*x^n])^2*(d + e*Log[f*x^r]))/x,x]

[Out]

-1/12*(e*r*(a + b*Log[c*x^n])^4)/(b^2*n^2) + ((a + b*Log[c*x^n])^3*(d + e*Log[f*x^r]))/(3*b*n)

Rule 12

Int[(a_)*(u_), x_Symbol] :> Dist[a, Int[u, x], x] /; FreeQ[a, x] &&  !MatchQ[u, (b_)*(v_) /; FreeQ[b, x]]

Rule 30

Int[(x_)^(m_.), x_Symbol] :> Simp[x^(m + 1)/(m + 1), x] /; FreeQ[m, x] && NeQ[m, -1]

Rule 2339

Int[((a_.) + Log[(c_.)*(x_)^(n_.)]*(b_.))^(p_.)/(x_), x_Symbol] :> Dist[1/(b*n), Subst[Int[x^p, x], x, a + b*L
og[c*x^n]], x] /; FreeQ[{a, b, c, n, p}, x]

Rule 2413

Int[((a_.) + Log[(c_.)*(x_)^(n_.)]*(b_.))^(p_.)*((d_.) + Log[(f_.)*(x_)^(r_.)]*(e_.))*((g_.)*(x_))^(m_.), x_Sy
mbol] :> With[{u = IntHide[(g*x)^m*(a + b*Log[c*x^n])^p, x]}, Dist[d + e*Log[f*x^r], u, x] - Dist[e*r, Int[Sim
plifyIntegrand[u/x, x], x], x]] /; FreeQ[{a, b, c, d, e, f, g, m, n, p, r}, x] &&  !(EqQ[p, 1] && EqQ[a, 0] &&
 NeQ[d, 0])

Rubi steps

\begin {align*} \int \frac {\left (a+b \log \left (c x^n\right )\right )^2 \left (d+e \log \left (f x^r\right )\right )}{x} \, dx &=\frac {\left (a+b \log \left (c x^n\right )\right )^3 \left (d+e \log \left (f x^r\right )\right )}{3 b n}-(e r) \int \frac {\left (a+b \log \left (c x^n\right )\right )^3}{3 b n x} \, dx\\ &=\frac {\left (a+b \log \left (c x^n\right )\right )^3 \left (d+e \log \left (f x^r\right )\right )}{3 b n}-\frac {(e r) \int \frac {\left (a+b \log \left (c x^n\right )\right )^3}{x} \, dx}{3 b n}\\ &=\frac {\left (a+b \log \left (c x^n\right )\right )^3 \left (d+e \log \left (f x^r\right )\right )}{3 b n}-\frac {(e r) \text {Subst}\left (\int x^3 \, dx,x,a+b \log \left (c x^n\right )\right )}{3 b^2 n^2}\\ &=-\frac {e r \left (a+b \log \left (c x^n\right )\right )^4}{12 b^2 n^2}+\frac {\left (a+b \log \left (c x^n\right )\right )^3 \left (d+e \log \left (f x^r\right )\right )}{3 b n}\\ \end {align*}

________________________________________________________________________________________

Mathematica [B] Leaf count is larger than twice the leaf count of optimal. \(129\) vs. \(2(57)=114\).
time = 0.07, size = 129, normalized size = 2.26 \begin {gather*} \frac {1}{12} \log (x) \left (-3 b^2 e n^2 r \log ^3(x)+12 \left (a+b \log \left (c x^n\right )\right )^2 \left (d+e \log \left (f x^r\right )\right )+4 b n \log ^2(x) \left (b d n+2 a e r+2 b e r \log \left (c x^n\right )+b e n \log \left (f x^r\right )\right )-6 \log (x) \left (a+b \log \left (c x^n\right )\right ) \left (2 b d n+a e r+b e r \log \left (c x^n\right )+2 b e n \log \left (f x^r\right )\right )\right ) \end {gather*}

Antiderivative was successfully verified.

[In]

Integrate[((a + b*Log[c*x^n])^2*(d + e*Log[f*x^r]))/x,x]

[Out]

(Log[x]*(-3*b^2*e*n^2*r*Log[x]^3 + 12*(a + b*Log[c*x^n])^2*(d + e*Log[f*x^r]) + 4*b*n*Log[x]^2*(b*d*n + 2*a*e*
r + 2*b*e*r*Log[c*x^n] + b*e*n*Log[f*x^r]) - 6*Log[x]*(a + b*Log[c*x^n])*(2*b*d*n + a*e*r + b*e*r*Log[c*x^n] +
 2*b*e*n*Log[f*x^r])))/12

________________________________________________________________________________________

Maple [C] Result contains higher order function than in optimal. Order 9 vs. order 3.
time = 0.70, size = 9164, normalized size = 160.77

method result size
risch \(\text {Expression too large to display}\) \(9164\)

Verification of antiderivative is not currently implemented for this CAS.

[In]

int((a+b*ln(c*x^n))^2*(d+e*ln(f*x^r))/x,x,method=_RETURNVERBOSE)

[Out]

result too large to display

________________________________________________________________________________________

Maxima [B] Leaf count of result is larger than twice the leaf count of optimal. 168 vs. \(2 (55) = 110\).
time = 0.29, size = 168, normalized size = 2.95 \begin {gather*} \frac {b^{2} e \log \left (c x^{n}\right )^{2} \log \left (f x^{r}\right )^{2}}{2 \, r} + \frac {b^{2} d \log \left (c x^{n}\right )^{3}}{3 \, n} + \frac {a b e \log \left (c x^{n}\right ) \log \left (f x^{r}\right )^{2}}{r} - \frac {a b n e \log \left (f x^{r}\right )^{3}}{3 \, r^{2}} - \frac {1}{12} \, {\left (\frac {4 \, n \log \left (c x^{n}\right ) \log \left (f x^{r}\right )^{3}}{r^{2}} - \frac {n^{2} \log \left (f x^{r}\right )^{4}}{r^{3}}\right )} b^{2} e + \frac {a b d \log \left (c x^{n}\right )^{2}}{n} + \frac {a^{2} e \log \left (f x^{r}\right )^{2}}{2 \, r} + a^{2} d \log \left (x\right ) \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((a+b*log(c*x^n))^2*(d+e*log(f*x^r))/x,x, algorithm="maxima")

[Out]

1/2*b^2*e*log(c*x^n)^2*log(f*x^r)^2/r + 1/3*b^2*d*log(c*x^n)^3/n + a*b*e*log(c*x^n)*log(f*x^r)^2/r - 1/3*a*b*n
*e*log(f*x^r)^3/r^2 - 1/12*(4*n*log(c*x^n)*log(f*x^r)^3/r^2 - n^2*log(f*x^r)^4/r^3)*b^2*e + a*b*d*log(c*x^n)^2
/n + 1/2*a^2*e*log(f*x^r)^2/r + a^2*d*log(x)

________________________________________________________________________________________

Fricas [B] Leaf count of result is larger than twice the leaf count of optimal. 182 vs. \(2 (55) = 110\).
time = 0.35, size = 182, normalized size = 3.19 \begin {gather*} \frac {1}{4} \, b^{2} n^{2} r e \log \left (x\right )^{4} + \frac {1}{3} \, {\left (2 \, b^{2} n r e \log \left (c\right ) + b^{2} n^{2} e \log \left (f\right ) + b^{2} d n^{2} + 2 \, a b n r e\right )} \log \left (x\right )^{3} + \frac {1}{2} \, {\left (b^{2} r e \log \left (c\right )^{2} + 2 \, a b d n + a^{2} r e + 2 \, {\left (b^{2} d n + a b r e\right )} \log \left (c\right ) + 2 \, {\left (b^{2} n e \log \left (c\right ) + a b n e\right )} \log \left (f\right )\right )} \log \left (x\right )^{2} + {\left (b^{2} d \log \left (c\right )^{2} + 2 \, a b d \log \left (c\right ) + a^{2} d + {\left (b^{2} e \log \left (c\right )^{2} + 2 \, a b e \log \left (c\right ) + a^{2} e\right )} \log \left (f\right )\right )} \log \left (x\right ) \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((a+b*log(c*x^n))^2*(d+e*log(f*x^r))/x,x, algorithm="fricas")

[Out]

1/4*b^2*n^2*r*e*log(x)^4 + 1/3*(2*b^2*n*r*e*log(c) + b^2*n^2*e*log(f) + b^2*d*n^2 + 2*a*b*n*r*e)*log(x)^3 + 1/
2*(b^2*r*e*log(c)^2 + 2*a*b*d*n + a^2*r*e + 2*(b^2*d*n + a*b*r*e)*log(c) + 2*(b^2*n*e*log(c) + a*b*n*e)*log(f)
)*log(x)^2 + (b^2*d*log(c)^2 + 2*a*b*d*log(c) + a^2*d + (b^2*e*log(c)^2 + 2*a*b*e*log(c) + a^2*e)*log(f))*log(
x)

________________________________________________________________________________________

Sympy [F]
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \int \frac {\left (a + b \log {\left (c x^{n} \right )}\right )^{2} \left (d + e \log {\left (f x^{r} \right )}\right )}{x}\, dx \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((a+b*ln(c*x**n))**2*(d+e*ln(f*x**r))/x,x)

[Out]

Integral((a + b*log(c*x**n))**2*(d + e*log(f*x**r))/x, x)

________________________________________________________________________________________

Giac [B] Leaf count of result is larger than twice the leaf count of optimal. 223 vs. \(2 (55) = 110\).
time = 4.62, size = 223, normalized size = 3.91 \begin {gather*} \frac {1}{4} \, b^{2} n^{2} r e \log \left (x\right )^{4} + \frac {2}{3} \, b^{2} n r e \log \left (c\right ) \log \left (x\right )^{3} + \frac {1}{3} \, b^{2} n^{2} e \log \left (f\right ) \log \left (x\right )^{3} + \frac {1}{2} \, b^{2} r e \log \left (c\right )^{2} \log \left (x\right )^{2} + b^{2} n e \log \left (c\right ) \log \left (f\right ) \log \left (x\right )^{2} + \frac {1}{3} \, b^{2} d n^{2} \log \left (x\right )^{3} + \frac {2}{3} \, a b n r e \log \left (x\right )^{3} + b^{2} e \log \left (c\right )^{2} \log \left (f\right ) \log \left (x\right ) + b^{2} d n \log \left (c\right ) \log \left (x\right )^{2} + a b r e \log \left (c\right ) \log \left (x\right )^{2} + a b n e \log \left (f\right ) \log \left (x\right )^{2} + b^{2} d \log \left (c\right )^{2} \log \left (x\right ) + 2 \, a b e \log \left (c\right ) \log \left (f\right ) \log \left (x\right ) + a b d n \log \left (x\right )^{2} + \frac {1}{2} \, a^{2} r e \log \left (x\right )^{2} + 2 \, a b d \log \left (c\right ) \log \left (x\right ) + a^{2} e \log \left (f\right ) \log \left (x\right ) + a^{2} d \log \left (x\right ) \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((a+b*log(c*x^n))^2*(d+e*log(f*x^r))/x,x, algorithm="giac")

[Out]

1/4*b^2*n^2*r*e*log(x)^4 + 2/3*b^2*n*r*e*log(c)*log(x)^3 + 1/3*b^2*n^2*e*log(f)*log(x)^3 + 1/2*b^2*r*e*log(c)^
2*log(x)^2 + b^2*n*e*log(c)*log(f)*log(x)^2 + 1/3*b^2*d*n^2*log(x)^3 + 2/3*a*b*n*r*e*log(x)^3 + b^2*e*log(c)^2
*log(f)*log(x) + b^2*d*n*log(c)*log(x)^2 + a*b*r*e*log(c)*log(x)^2 + a*b*n*e*log(f)*log(x)^2 + b^2*d*log(c)^2*
log(x) + 2*a*b*e*log(c)*log(f)*log(x) + a*b*d*n*log(x)^2 + 1/2*a^2*r*e*log(x)^2 + 2*a*b*d*log(c)*log(x) + a^2*
e*log(f)*log(x) + a^2*d*log(x)

________________________________________________________________________________________

Mupad [B]
time = 3.99, size = 124, normalized size = 2.18 \begin {gather*} \ln \left (f\,x^r\right )\,\left (\frac {b^2\,e\,{\ln \left (c\,x^n\right )}^3}{3\,n}+\frac {a\,b\,e\,{\ln \left (c\,x^n\right )}^2}{n}\right )+\frac {{\ln \left (c\,x^n\right )}^3\,\left (b^2\,d\,n-a\,b\,e\,r\right )}{3\,n^2}+a^2\,d\,\ln \left (x\right )+\frac {a^2\,e\,{\ln \left (f\,x^r\right )}^2}{2\,r}+\frac {a\,b\,d\,{\ln \left (c\,x^n\right )}^2}{n}-\frac {b^2\,e\,r\,{\ln \left (c\,x^n\right )}^4}{12\,n^2} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

int(((d + e*log(f*x^r))*(a + b*log(c*x^n))^2)/x,x)

[Out]

log(f*x^r)*((b^2*e*log(c*x^n)^3)/(3*n) + (a*b*e*log(c*x^n)^2)/n) + (log(c*x^n)^3*(b^2*d*n - a*b*e*r))/(3*n^2)
+ a^2*d*log(x) + (a^2*e*log(f*x^r)^2)/(2*r) + (a*b*d*log(c*x^n)^2)/n - (b^2*e*r*log(c*x^n)^4)/(12*n^2)

________________________________________________________________________________________